<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/layouts/include/taglib.jsp" %>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="decorator" content="step" />
</head>
<body>
<div class="doc-menu">
	 <%@ include file="/jsp/cd/doc/cdDocLeftZtree.jsp" %>	
</div>

<div class="doc-content mdl-130">
	
	<hr>
	<div class="my-doc-content">
		<div class="table-responsive">
			<table id="sample-table-1"  class="table table-hover">
				<thead>
					<tr>
						<th class="center col-xs-1">
							<label>
							<input type="hidden" id="restoreUuidAll">
							<input type="checkbox" class="ace" id="checkBoxChanges" name="checkBoxChanges"/>
							<span class="lbl"></span>
							</label>
						</th>
						<th id="deleteButton"><label>文件名字</label></th>
						<th><label>分享方式</label></th>
						<th><label>文件类型</label></th>
						<th><label>下载次数</label></th>
					</tr>
				</thead>
				
				<tbody id="shareList">
				
				</tbody>												
			</table>
		</div>
	</div>
</div>
  <!-- 选择分享方式 -->
        <div class="modal"  id="updateShareModen"><!-- class="modal fade" 添加效果 -->
			<div class="modal-dialog" >
			
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				        <h4 class="modal-title">修改分享方式</h4>
				      </div>
				      <form class="form-horizontal" role="form" id="updateShareModen-from">
				      <div class="row row-content">
				      		<input type="hidden" id="shareUuid">
				      		 <div class="col-sm-10" >
					  		 	  <div class="form-group col-sm-10">
									<label class="col-sm-6 control-label" for="roleNo">分享方式</label>
										<div class="col-sm-6 control-label">
											<tags:select name="shareType" id="shareType" type="cdShareType" hasBlank="true"></tags:select>
										</div>
								</div> 
				        	</div>
						<div id="target">
					  		
				        	 <!-- 个人 -->
				        	 <div class="col-sm-12" id="personDiv">
					  		 	 <div class="form-group col-sm-12">
									<label class="col-sm-4 control-label" for="empName">根据个人分享</label>
										<div class="col-sm-6 control-label">
											<tags:select type="" dataUrl="/cd/doc/selectPerson.do" hasBlank="true" name="empNo" id="empNo" optionValue="empNo" 
                                             optionName="empName"></tags:select>
										</div>
										<button type="button" class="btn btn-xs btn-checkBox checkBoxButton addPerson" data-toggle="button" value="" >添加</button></a>
								</div>
								<br/>
				        		<div class="form-group col-sm-10" id="person">
				        			<button type="button" style="display: none"  class="btn btn-xs btn active" data-toggle="button" id="personButton"></button>
				        		</div>
				        	 </div>
				        	<!-- 角色 -->
				        	 <div class="col-sm-12" id="roleDiv">
					        	<div class="form-group col-sm-12">
									<label class="col-sm-4 control-label" for="roleName">根据角色分享</label>
										<div class="col-sm-6 control-label">
											<tags:select type="" dataUrl="/cd/doc/selectRole.do" hasBlank="true" name="roleNo" id="roleNo" optionValue="uuid" 
                                             optionName="roleName"></tags:select> 
										</div>
										<button type="button" class="btn btn-xs btn-checkBox checkBoxButton addRole" data-toggle="button" value="" >添加</button>
								</div>
				        		<div class="form-group col-sm-10" id="role">
				        			<button type="button" style="display: none"  class="btn btn-xs btn active" data-toggle="button" id="roleButton"></button>
				        		</div>
				        	</div>
				        	<!-- 项目 -->
				        	 <div class="col-sm-12" id="projectDiv">
					        	<div class="form-group col-sm-12">
									<label class="col-sm-4 control-label" for="prjName">根据项目分享</label>
										<div class="col-sm-6 control-label">
											<tags:select type="" hasBlank="true" dataUrl="/cd/doc/selectProjcet.do" name="prjName" id="prjName" optionValue="uuid" optionName="prjName"></tags:select>

										</div>
										<button type="button" class="btn btn-xs btn-checkBox checkBoxButton addProject" data-toggle="button" value="" >添加</button>
								</div>
				        		<div class="form-group col-sm-12" id="project">
				        			<button type="button" style="display: none"  class="btn btn-xs btn active" data-toggle="button" id="projectButton"></button>
				        		</div>
				        	</div>
				       </div>
				   
				      </div>
				       </form>
				      <div class="modal-footer" id="updateShareDiv">
				        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				        <button type="button" class="btn btn-primary updateShare" id="stepModen-btn-save" >保存</button>
				      </div>
				      
				    </div><!-- /.modal-content -->
				   
			  	</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

 <script type="text/javascript" src="${ctx}/jsp/cd/doc/shareList.js"></script> 
   <script id="showShareListMtp" type="x-tmpl-mustache">
	{{#data}}
	<tr class="clickTr" name="clickName">
		<td class="center col-xs-1">
			<label>
				<input type="checkbox"  name="exitShare" class="ace checkShare"  value="{{uuid}}"/>
				<span class="lbl"></span>
			</label>	
		</td>
		<td class="cdDocmousedown  col-xs-6" id="{{uuid}}">              			
			{{folderName}}				
			<div class="pull-right action-buttons">
				<a class="red pull-right btn-ace deleteShareFile" href="#" uuid="{{uuid}}"  folderId="{{folderId}}" title="取消分享" style="margin-top: -5px"><i class='icon-trash bigger-80'></i></a>
				<a class="red btn-ace updateShareFile" href="#" uuid="{{uuid}}" folderId="{{folderId}}" title="修改分享" style="margin-top: -5px"><i class='icon-pencil bigger-130'></i></a>				
			</div>	
		</td>
		<td class=" col-xs-1">
				{{isShareType}}
		</td>
		<td class=" col-xs-1">
				{{isFolderType}}
		</td>
		<td class=" col-xs-1">
				{{downCnt}}
		</td>
	</tr>
	{{/data}}


  </script> 
</body>
